﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Common;
using Datalayer;

namespace QLHoNgheo.Manager
{
    public partial class frm_BaoCao : Form
    {
        string _HoNgheo ="";
        public frm_BaoCao(string IDHongheo)
        {
            this._HoNgheo = IDHongheo;
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            xuatbaocao(_HoNgheo);
        }
        DataTable dt;
        IQueryMgr iq;
        public void xuatbaocao(string IDHoNgheo)
        {
            iq = QueryMgr.GetDbInstance();
            dt = Cl_Convert.ToDataTable(iq.QHGD_GetQuanHeGiaDinhByHoNgheoID(IDHoNgheo));
            FrmBaoCao xtrp = new FrmBaoCao(IDHoNgheo);
            xtrp.DataSource = dt;
            xtrp.bindData(IDHoNgheo);
            xtrp.bindData1(IDHoNgheo);
            xtrp.bindData2(IDHoNgheo);
            xtrp.bindData3(IDHoNgheo);
            xtrp.bindData4(IDHoNgheo);
            xtrp.check(IDHoNgheo);
            xtrp.check1(IDHoNgheo);
            xtrp.check2(IDHoNgheo);
            printControl1.PrintingSystem = xtrp.PrintingSystem;          
            xtrp.CreateDocument();
        
        }
       
        private void button1_Click(object sender, EventArgs e)
        {
           
        }

        private void gridControl1_EmbeddedNavigator_ButtonClick(object sender, DevExpress.XtraEditors.NavigatorButtonClickEventArgs e)
        {

        }
    }
}
